﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wolfy.NetDisk.Core.Model;

namespace Wolfy.NetDisk.Core.Service
{
    public interface IUserService : ICRUDService<User>
    {
        /// <summary>
        /// 用户名是否存在
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        bool IsExist(string name);
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="id"></param>
        /// <param name="password"></param>
        void ChangePassword(int id, string password);
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="name"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        User Login(string name, string password);
    }
}
